<div id="left_div">
<h2>Invite Members</h2>

<% form_for [@project,@new_ms] do |f| %>
  <% fields_for :invite do |ff| %>
    <%= ff.label :name %>
      <%= ff.text_field :name, :size => 20 %>
    <%= ff.label :email %>
      <%= ff.text_field :email, :size => 20 %>
  <% end %>
  <%= f.submit "Send Invite" %>
<% end %>

<% if @users.empty? -%>
<p>No users to invite!</p>
<% else -%>
<ul>
<% @users.each do |user| -%>
  <li>
    <%= user.name %> -- <%= user.email %> (<%= link_to "invite", project_memberships_path(@project, :user_id => user.id), :title => "Invite #{user.name}", :method => :post %>)
  </li>
<% end -%>
</ul>
<% end -%>

<%= link_to "Back to Project", project_path(@project) %>
</div>

<div id="right_div">
  <%= render :partial => 'projects/bar' %>
</div>
